steam_get_stat_int

语法:

steam_get_stat_int(stat_name);


参数 描述
stat_name The name of the statistic to get (a string).


返回: Real(实数)


描述

With this function you can get the value of a specific signed integer statistic. The statistic should have been previously defined on the Steamworks control panel accounts page for your game and the string that is passed to the function should match that used as the API Name on the control panel.


例如:

xp += 100;
steam_set_stat_int("Total_XP", steam_get_stat_int("Total_XP") + 100);
if steam_get_stat_int("Total_XP") > 1000
   {
   if !steam_get_achievement("Ach_1000XP") steam_set_achievement("Ach_1000XP");
   }

The above code sets a statistic and then checks the final value for it to decide whether to award an achievement or not.